﻿@{
    ViewBag.Title = "商品查看";
    Layout = "~/Views/Shared/_WindowLayout.cshtml";
}
@model TEWorkFlow.Domain.Archives.GoodsArchives
@section script
{
    <script type="text/javascript">
        mini.parse();

        labelModel(new mini.Form("form1"));
        function SaveData() {
            CloseWindow();
        }
        var GbCode = mini.get("GbCode");
        var GmCode = mini.get("GmCode");
        var GsCode = mini.get("GsCode");
        var GlCode = mini.get("GlCode");

        function onGbCodeChanged() {
            var id = GbCode.getValue();
            var url = "/Category/GetFbPaGoodsGm/" + id
            GmCode.setUrl(url);
        }
        function onGmCodeChanged() {
            var id = GmCode.getValue();
            var url = "/Category/GetFbPaGoodsGs/" + id
            GsCode.setUrl(url);
        }
        function onGsCodeChanged() {
            var id = GsCode.getValue();
            var url = "/Category/GetFbPaGoodsGl/" + id
            GlCode.setUrl(url);
        }
    </script>
}
<table class="edittable" border="1" cellpadding="0" cellspacing="0">
    <tr>
        <td style="width: 80px;">
            店内码:
        </td>
        <td style="width: 120px;">
            <input name="GoodsCode" value="@Model.Id" class="mini-textbox" />
        </td>
        <td style="width: 80px;">
            条形码:
        </td>
        <td style="width: 120px;">
            <input name="GoodsBarCode" value="@Model.GoodsBarCode" class="mini-textbox"/>
        </td>
        <td style="width: 80px;">
            商品简码:
        </td>
        <td style="width: 120px;">
            <input name="GoodsSubCode" value="@Model.GoodsSubCode" class="mini-textbox"/>
        </td>
    </tr>
    <tr>
        <td>
            大类:
        </td>
        <td>
            <input name="GbCode" value="@Model.GbCode" id="GbCode" class="mini-combobox" textField="text" valueField="id" onvaluechanged="onGbCodeChanged" url="/category/GetFbPaGoodsGb/" showNullItem="true" />
        </td>
        <td>
            中类:
        </td>
        <td>
            <input name="GmCode" value="@Model.GmCode" id="GmCode" class="mini-combobox" textField="text" valueField="id" onvaluechanged="onGmCodeChanged" url="/Category/GetFbPaGoodsGm/" showNullItem="true"  />
        </td>
        <td>
            小类:
        </td>
        <td>
            <input name="GsCode" value="@Model.GsCode" id="GsCode" class="mini-combobox" textField="text" valueField="id" onvaluechanged="onGsCodeChanged" url="/Category/GetFbPaGoodsGs/" showNullItem="true"  />
        </td>
    </tr>
    <tr style="display: none">
        <td>
            细类:
        </td>
        <td>
            <input name="GlCode" value="@Model.GlCode" id="GlCode" class="mini-combobox" textField="text" valueField="id" url="/Category/GetFbPaGoodsGl/" showNullItem="true"  />
        </td>
        <td>
            商品类型:
        </td>
        <td>
            <input name="GoodsType" value="@Model.GoodsType" class="mini-textbox"/>
        </td>
        <td>
            核算方式:
        </td>
        <td>
            <input name="CheckMode" value="@Model.CheckMode" class="mini-textbox"/>
        </td>
    </tr>
    <tr>
        <td>
            供货商:
        </td>
        <td>
            <input name="SupCode" class="mini-combobox" multiSelect="true" textField="SupName" valueField="Id" emptyText="请选择..." url="/Archives/GetAllSupplierArchive" value="@Model.SupCode"  allowInput="false" showNullItem="true" nullItemText="请选择..."/>
        </td>
        <td>
            规格:
        </td>
        <td>
            <input name="Specification" value="@Model.Specification" class="mini-textbox"/>
        </td>
        <td>
            操作员:
        </td>
        <td>
            <input name="Operator" class="mini-combobox"  textField="text" valueField="id" emptyText="" url="/Category/AllUsers" value="@Model.Operator"  allowInput="false" showNullItem="true" nullItemText="请选择..."/>
        </td>
    </tr>
    <tr>
        <td>
            商品名称:
        </td>
        <td>
            <input name="GoodsName" value="@Model.GoodsName" class="mini-textbox"/>
        </td>
        <td>
            商品简称:
        </td>
        <td>
            <input name="GoodsSubName" value="@Model.GoodsSubName" class="mini-textbox"/>
        </td>
        <td>
            拼音数字码:
        </td>
        <td>
            <input name="PyCode" value="@Model.PyCode" class="mini-textbox"/>
        </td>
    </tr>
    <tr>
        <td>
            进价:
        </td>
        <td>
            <input name="PurchasePrice" value="@Model.PurchasePrice" class="mini-spinner" decimalPlaces="2" maxValue="99999" />
        </td>
        <td>
            建议零售价:
        </td>
        <td>
            <input name="ProposePrice" value="@Model.ProposePrice" class="mini-spinner" decimalPlaces="2" maxValue="99999" />
        </td>
        <td>
            产地:
        </td>
        <td>
            <input name="ProducingArea" value="@Model.ProducingArea" class="mini-textbox"/>
        </td>
    </tr>
    <tr>
        <td>
            审核人:
        </td>
        <td>
            <input name="Assessor" class="mini-combobox"  textField="text" valueField="id" emptyText="" url="/Category/AllUsers" value="@Model.Assessor"  allowInput="false" showNullItem="true" nullItemText="请选择..."/>
        </td>
        <td>
            是否审核:
        </td>
        <td>
            @if (Model.IfExamine == "1")
            {
                <span>审核</span>
            }
        </td>
        <td>
            审核时间:
        </td>
        <td>
            <input name="ExamineDate" value="@Model.ExamineDate" class="mini-datepicker"/>
        </td>
    </tr>
    <tr>
        <td>
            操作时间:
        </td>
        <td>
            <input name="OperatorDate" value="@Model.OperatorDate" class="mini-datepicker" />
        </td>
        <td colspan="4"></td>
    </tr>
    <tr>
        <td>
            备注:
        </td>
        <td colspan="5">
            <input name="Remark" value="@Model.Remark" class="mini-textarea" width="100%"/>
        </td>
    </tr>
    @*    <tr>
        <td>
            历史进价:
        </td>
        <td colspan="5">
            <input name="PriceHistory" value="@Model.PriceHistory" class="mini-textarea" width="100%"/>
        </td>
    </tr>*@
</table>
